package com.hezuti.info.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Property;
import org.springframework.stereotype.Component;

import com.hezuti.common.dao.BaseHibernateDaoGeneric;
import com.hezuti.info.domain.District;
import com.hezuti.info.domain.Town;

@Component
public class TownDao extends BaseHibernateDaoGeneric<Town>{

	public List<Town> findAllByDid(int did){
		Criteria criteria = this.createCriteria(Property.forName(
				Town.FEILD_DID).eq(did));
		return this.findBy(criteria);
	}
	
}
